import { Merchant } from '../types/merchant';

export const mockMerchants: Merchant[] = [
  {
    id: 'MERCHANT001',
    name: 'Central Mall Joltzly Station',
    address: 'Central Mall, Floor 2, Near Food Court, 123 Main Street, Downtown',
    logo: '/src/assets/img/merchant/default.jpg',
    status: 'open',
    distance: '0.2km',
    availableCount: 8,
    returnCount: 2,
    businessHours: '24/7',
    latitude: 10.762622,
    longitude: 106.660172
  },
  {
    id: 'MERCHANT002',
    name: 'Tech Hub Power Station',
    address: 'Tech Hub Building A, Lobby Area, 456 Innovation Drive, Tech District',
    logo: '/src/assets/img/merchant/default.jpg',
    status: 'open',
    distance: '0.5km',
    availableCount: 5,
    returnCount: 0,
    businessHours: 'Mon-Fri: 8:00-22:00',
    latitude: 10.763622,
    longitude: 106.661172
  },
  {
    id: 'MERCHANT003',
    name: 'Shopping Center Station',
    address: 'Shopping Center, Ground Floor, Near Entrance, 789 Commerce Road',
    logo: '/src/assets/img/merchant/default.jpg',
    status: 'open',
    distance: '0.8km',
    availableCount: 0,
    returnCount: 6,
    businessHours: 'Daily: 9:00-21:00',
    latitude: 10.764622,
    longitude: 106.662172
  },
  {
    id: 'MERCHANT004',
    name: 'Airport Terminal Station',
    address: 'Airport Terminal, Gate 15, Waiting Area, International Airport',
    logo: '/src/assets/img/merchant/default.jpg',
    status: 'closed',
    distance: '2.1km',
    availableCount: 3,
    returnCount: 1,
    businessHours: '24/7',
    latitude: 10.765622,
    longitude: 106.663172
  },
  {
    id: 'MERCHANT005',
    name: 'University Campus Station',
    address: 'University Campus, Library Building, 3rd Floor, 321 Education Avenue',
    logo: '/src/assets/img/merchant/default.jpg',
    status: 'outOfService',
    distance: '1.5km',
    availableCount: 0,
    returnCount: 0,
    businessHours: 'Mon-Sun: 7:00-23:00',
    latitude: 10.766622,
    longitude: 106.664172
  },
  {
    id: 'MERCHANT006',
    name: 'Coffee Shop Station',
    address: 'Starbucks Coffee, 654 Coffee Street, Near Train Station',
    logo: '/src/assets/img/merchant/default.jpg',
    status: 'open',
    distance: '1.2km',
    availableCount: 4,
    returnCount: 3,
    businessHours: 'Daily: 6:00-24:00',
    latitude: 10.767622,
    longitude: 106.665172
  }
];

export const getMerchantsByTab = (tabType: 'rent' | 'return' | 'all'): Merchant[] => {
  switch (tabType) {
    case 'rent':
      return mockMerchants.filter(merchant => merchant.availableCount > 0);
    case 'return':
      return mockMerchants.filter(merchant => merchant.returnCount > 0);
    case 'all':
    default:
      return mockMerchants;
  }
};
